package cn.edu.sjtu.spinning.enums;

import lombok.AccessLevel;
import lombok.Getter;

/**
 * @author loumoon
 * @date 2019-12-04 13:29
 */
@Getter(AccessLevel.PUBLIC)
public enum RespStatus {
    SUCCESS("200", "请求成功"),

    INVALID_RESPONSE_FROM_OPC("300", "OPC的响应不合法"),
    FAIL_START_DEVICE("301", "启动设备失败"),
    NO_TASK_WAITING("302", "队列中没有等待的任务"),
    TASK_OFFER_ERROR("500", "任务未能成功加入队列"),

    SERVER_ERROR("400", "服务器错误");
//    UNKNOWN_ERROR("500", "未知错误");


    private String code;
    private String message;

    RespStatus(String code, String message) {
        this.code = code;
        this.message = message;
    }
}